<!-- 
 - Copyright 2012 OmniFaces.
 -
 - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 - the License. You may obtain a copy of the License at
 -
 -     http://www.apache.org/licenses/LICENSE-2.0
 -
 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 - an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 - specific language governing permissions and limitations under the License.
 -->
<ui:composition template="/WEB-INF/templates/layout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:o="http://omnifaces.org/ui"
>
	<ui:define name="content">
		<h:outputStylesheet library="showcase" name="prettify/prettify.css" target="head" />
		<h:outputScript library="showcase" name="prettify/prettify.js" target="head" />
		<h:outputScript target="body">prettyPrint();</h:outputScript>

		<p:panel id="description" header="Description">
			<ui:insert name="description" />
		</p:panel>

		<ui:fragment rendered="#{not empty page.current.sources}">
			<p:panel id="demo" header="Demo">
				<ui:insert name="demo" />
				<o:highlight />
			</p:panel>

			<p:panel id="source" header="Source code">
				<p:tabView value="#{page.current.sources}" var="source">
					<p:tab title="#{source.title}">
						<pre class="prettyprint"><code class="lang-#{source.type}">#{source.code}</code></pre>
					</p:tab>
				</p:tabView>
			</p:panel>
		</ui:fragment>

		<p:panel id="documentation" header="Documentation" rendered="#{not empty page.current.documentation.apidocs}">
			<ul>
				<ui:repeat value="#{page.current.documentation.vdldocs}" var="path">
					<li><a href="http://wiki.omnifaces.googlecode.com/hg/vdldoc/#{path}.html"><code>#{path.replace('/', ':')}</code> VDL documentation</a></li>
				</ui:repeat>
				<ui:repeat value="#{page.current.documentation.apidocs}" var="path">
					<li><a href="http://wiki.omnifaces.googlecode.com/hg/javadoc/org/omnifaces/#{path}.html"><code>org.omnifaces.#{path.replace('/', '.')}</code> API documentation</a></li>
				</ui:repeat>
				<ui:repeat value="#{page.current.documentation.codes}" var="path">
					<li><a href="http://code.google.com/p/omnifaces/source/browse/src/org/omnifaces/#{path}.java"><code>org.omnifaces.#{path.replace('/', '.')}</code> source code</a></li>
				</ui:repeat>
			</ul>
		</p:panel>
	</ui:define>
</ui:composition>